JS reads XML file data and displays data in table format (compatible with IE and Firefox), xmltable
This document describes how to use JavaScript to read XML file data and display data in table format. We will share this with you for your reference. The details are as follows:
First look at the xml file:
Aspx page code:
The above JS operations mainly avoid using childNodes (because in Firefox, sometimes childNodes [0] gets "\ n" instead of the first
JavaScript converts xml into an html table, xmltable
This example describes how to convert xml into an html table using JavaScript. Share it with you for your reference. The details are as follows:
function ConvertToTable(targetNode){ // if the targetNode is xmlNode this line must be removed // i couldnt find a way to parse xml string to xml node // so i parse xml string to xml document targetNode = targetNode.childNodes[0]; // first we need to create
--Multiple data can be composed of more than one XML tree l insert
--Incoming XML tree as varchar parameter
Syntax for--insert xx select xxx from OPENXML () Insert data
-----------------------------------import, export XML--------------------------
--1 Import Instance
--Single table
CREATE table Xmltable (Name nvarchar, nowtime nvarchar (20))
Declare @s as nvarchar (2000);
Set @s = N ' '
declare @idHandle as int;
EXEC sp_xml_preparedocument @idHandle
Tags: tar idt val ext http about csdn Select MoDfrom:http://blog.csdn.net/tjvictor/article/details/4370771XML indexes in SQL Server fall into two categories: primary XML indexes and secondary XML indexes. The secondary XML index is divided into: PATH secondary XML index, VALUE Secondary XML index, property auxiliary XML index.An example of the syntax for creating an XML index is as follows:[C-sharp]View PlainCopy
CREATE TABLE XMLTable (Id int prim
In the above XQuery, the Fn:doc XQuery function is used to access a single XML document stored in an Oracle XML DB repository. But what if you want to work with XML documents that have the same or similar structure (stored in the same XML repository folder)? In this case, another XQuery function (that is, fn:collection) that i
In fact, the XML string is like an external table in Oracle, so Oracle has some rules for parsing XML strings that are very demanding. The data provided by the XML string is a table, so Oracle must provide a column header that is consistent with the XML dataExample One
SELECT * from XMLTABLE (' $B/deal_basic/user_deal_info ' passingXMLTYPE (' ? xml version= "1.0" encoding= "gb2312" ? >xml ') as BCOLUMNS user_deal_id VARCHAR2 () PATH '/use
1. EXTRACT (xmltype_instance,xpath_string)
This function is used to return the corresponding content under the XML node path
Example:
Copy Code code as follows:
SELECT Extract (Value (a), '/root/main ') data from xmltable A;
2. Extractvalue (xmltype_instance,xpath_string)
This function is used to return data for a specific XML node path
Example:
Copy Code code as follows:
SELECT Extractvalue (Value (a), '/root/
may come in handy. This article will introduce several examples of how to use the FN: Collection XQuery function later.
QueryXmltypeData
XQuery allows you to operate on XML-based and non-schema-based data. The following example demonstrates how to use the xmltable function to query an xmltype table in the purchaseorder XML mode from the OE demo database mode.
Select ttab. column_value as ordertotal from purchaseorder,
an order document. The related columns store the order ID, customer ID, order date, and entry sequential number respectively.
CREATETABLEitems(ordIDINTEGER,custIDINTEGER,
odateDATE,seqNoINTEGER,itemXML);
INSERTINTOitems(ordID,custID,odate,seqno,item)
SELECTT.ordID,T.custID,T.odate,T.seqno,XMLDOCUMENT(T.item)
FROM
XMLTABLE('$d/order/item'PASSINGcast(?ASXML)"d"
COLUMNS
ordIDINTEGERPATH'../@OrderID',
custIDINTEGERPATH'../custo
Today in Oracle11g environment manufacturing data encountered ORA-30009: CONNECTBY operation memory is insufficient, 10g began to support XML, changed to xmltable can be.
Today in the Oracle 11G environment manufacturing data encountered ORA-30009: connect by Operation memory is insufficient, 10g began to support XML, changed to xmltable can be.
Today in the Oracle 11G environment manufacturing data en
--Create XMLTableCreate TableXMLTable (Idint IDENTITY(1,1)Primary Key, xmlcol XML); Go ------------------------------------------------------------------------------------Insert XML Data SingleInsert into [XML].[dbo].[XMLTable] ([Xmlcol]) Select * from OpenRowset(BULK 'G:\Document\XMLDocument\x3.xml', Single_clob) asx------------------------------------------------------------------------------------Insert XML Data SingleDECL
1. Use dual with Connect by levelCreate Table as Select as ID from by Level100000;However, there is a limit of connect by level, if exceeding the limit, the system will report, "Connect by Level" Memory is not enough, I tried 10 billion data can, but no more.2, using XMLTable, "CONNECT by operation Memory is not enough, 10g began to support XML, changed to XMLTable can be", the code is as follows:Create
Research on extracting relational data from XML of clob FieldThe following functions are used in this article: Extract, extractvalue, existsnode, xmlsequence, xmltype, xmltable, and xmlquery. The specific syntax of the function is not described here.Before extracting data, use the xmltype function to convert clob data into XML data.1. The data in XML is a single table and only one row of data.This situation is simple and fast. Example:SelectExtractval
ORA-30009: connect by memory insufficient
Today in the Oracle 11G environment manufacturing data encountered ORA-30009: connect by Operation memory is insufficient, 10g began to support XML, changed to xmltable can be.
SQL> drop table t_range purge;
SQL> create table t_range (id number not null PRIMARY KEY, test_date date) partition by range (test_date)(Partition p_2014_7 values less than (to_date ('2017-08-01 ', 'yyyy-mm-dd ')),Partition p_2014_8 val
; footnotes >5.61 footnotes > footnote list > Business > Business Set > footnote list > footnotes >5.208 footnotes > footnote list > Frequency Division >Query " Business > "in the Owlcode property and the " footnote list > ", Query SQL as follows:Select fa.freq_zone_id, Xt.owlcode owl_code,footnote from Fs_freq_allocation_cn FA, xmltable ( '/ " Span style= "font-family: Song body; Background-color:white "> frequency division / business s
1. Error ORA-30009 when manufacturing dataTo schedule a task:Insert into Select from by rownum100000There will be ORA-30009 connect-by errorTo modify a task:Insert into Select from xmltable ('1 to 100000')Use XMLTable to accumulate2, Tns:no LISTENER1) under Win, turn on Oracle monitoring2) under Linux, CD $ORACLE _home/bin and then lsnrctl start monitoring3. Installation of Oracle version limitDatabas
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.